package org.ResearchProject.service.serviceImpl;

import org.ResearchProject.dto.ThisProjectPeopleDto;
import org.ResearchProject.mapper.ResearchProjectMapper;
import org.ResearchProject.pojo.ResearchProject;
import org.ResearchProject.service.ResearchProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 2024-12-13-19:26
 */
@Service
public class ResearchProjectServiceImpl implements ResearchProjectService {
    @Autowired
    ResearchProjectMapper researchProjectMapper;
    @Override
    public void insertResearchProject(ResearchProject researchProject) {
        researchProjectMapper.insertResearchProject(researchProject);
    }

    @Override
    public void addMembers(ArrayList members, int projectId, int tutorId) {
        researchProjectMapper.addMembers(members,projectId,tutorId);
    }

    @Override
    public ThisProjectPeopleDto getThisProjectPeople(int projectId) {
        return researchProjectMapper.getThisProjectPeople(projectId);
    }

    @Override
    public void deleteMembers(ArrayList<Integer> members, Integer projectId, Integer tutorId) {
        researchProjectMapper.deleteMembers(members, projectId, tutorId);
    }

    @Override
    public void deleteProject(Integer projectId) {
        researchProjectMapper.deleteProject(projectId);
    }

    @Override
    public void updateProject(ResearchProject researchProject) {
        researchProjectMapper.updateProject(researchProject);
    }
}
